home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / XGA.TXT < prev    next >
Text File  |  1995-09-29  |  46KB  |  970 lines

  1.   IBM XGA      1024*768 interlaced
  2.   IBM XGA-NI   1024*768 Non-interlaced
  3.  
  4. All register accesses happen through a block of 16 registers starting
  5. at a adapter dependent register (called xga in the following).
  6. The register xga+0Ah works as an indexed register i.e.. xga+0Ah is the
  7. index register and xga+0Bh is the data register.
  8.  
  9. Also a block of 128 bytes memory mapped registers exists, primarily used for
  10. the accelerator functions.
  11.  
  12. General note:
  13. When writing to XGA registers undefined bits must be set to 0 unless
  14. otherwise specified. When reading the undefined bits may be truly undefined,
  15. i.e. random.
  16.  
  17. 0100h  W(R):  Identification Word
  18. bit  0-15  Identification Word ID'ng the XGA board.
  19.              8FDAh = The IBM XGA-NI.
  20.              8FDBh = Original IBM XGA
  21.              (8FD8h-8FDBh is reserved for IBM XGA's).
  22.            VESA defines the following ranges for XGA compatible boards:
  23.              240h-27Fh, 830h-0A7F, 0A90h-0BFFh and 8FD0h-8FD3h(reserved)
  24. Note: POS register access must be enabled.
  25.  
  26. 0102h  (R/W):  XGA Configuration Register
  27. bit     0  XGA_ENABLE. If set the XGA registers can be accessed, when cleared
  28.            only the POS registers (100h-105h) can be accessed.
  29.       1-3  INSTANCE. IDs the particular XGA adapter (there can be up to 8 in
  30.            a system). This value is used to define the XGA base address
  31.            (21x0h) and which 128 byte block of the 1KB external memory the
  32.            memory mapped registers are located in.
  33.       4-7  EXT_MEM_ADDR. Defines the address the 8KB (usually 7KB ROM and 1KB
  34.            dedicated to XGA memory mapped registers) external memory is mapped
  35.            to:
  36.              0 = 0C000h,  1 = 0C2000h,  2 = 0C4000h,  3 = 0C6000h
  37.              4 = 0C800h,  5 = 0CA000h,  6 = 0CC000h,  7 = 0CE000h
  38.              8 = 0D000h,  9 = 0D2000h, 0A = 0D4000h, 0B = 0D6000h
  39.             0C = 0D800h, 0D = 0DA000h, 0E = 0DC000h, 0F = 0DE000h
  40.            The external memory can be disabled by clearing the EXT_MEM_ENABLE
  41.            bit in the Bus Arbitration Register (103h).
  42.  
  43. 0103h  (R/W):  Bus Arbitration Register
  44. bit     1  EXT_MEM_ENABLE. If set the 8KB external memory block can be
  45.            accesses, if clear only the 1KB memory mapped registers can be
  46.            accessed.
  47.         2  FAIR_ENABLE. If set the MCA fairness protocol is enabled.
  48.       3-6  ARB_LEVEL. The MCA bus arbitration level.
  49. Note: for VESA systems set 106h to 0 to access this register.
  50.  
  51. 0104h  (R/W):  Display Memory Base Address
  52. bit     0  DISP_MEM_ACCESS. If set the display memory is mapped as a
  53.            contiguous 4MB chunk at the address described below.
  54.       1-7  DISP_MEM_BASE. The upper 7 bits (25-31) of the display memory
  55.            address. Bit 22-24 is taken from the INSTANCE field of register
  56.            102h.
  57. Note: for VESA local bus systems set 106h to 0 to access this register.
  58.  
  59. 0104h index 1 (R):  Manufactor ID low                                   (VESA)
  60. bit   0-7  Low byte of manufactor ID.
  61. Note: Set 106h to 1 to read this register
  62. Note: This register may be implemented as Read only or Read/Write.
  63.  
  64. 0104h index 2 (R):  Manufactor ID high                                  (VESA)
  65. bit   0-7  High byte of manufactor ID.
  66.            This register is optional and reads as 0 if not implemented
  67. Note: Set 106h to 2 to read this register
  68. Note: This register may be implemented as Read only or Read/Write.
  69.  
  70. 0104h index 3 (R/W):  VGA BIOS Configuration                            (VESA)
  71. bit     0  VGA BIOS ROM Decode Enabled if set
  72.       1-3  VGA BIOS ROM Decode Location. VGA BIOS ROM at:
  73.              0: C000h, 1: C800h, 2: D000h, 3: D800h, 4: E000h, 5: E800h
  74. Note: Set 106h to 1 to read this register
  75.  
  76. 0105h  (R/W):  1MB Aperture Base Address
  77. bit   0-3  BASE_1MB. Determines the address of the 1MB aperture where the
  78.            video memory will be mapped. 0 indicates that a 1MB block could not
  79.            be found in the lower 16MB of the address space.
  80. Note: When writing to this register bits 4-7 must be written as 1101b,
  81.       i.e.. 0BFh.
  82.  
  83. 0106h  W(W):  POS index                                                 (VESA)
  84. bit  0-15  This register determines the content of register 0103h and 0104h.
  85.            Values 4-0Fh are reserved. When this register is 0 the registers at
  86.            0103h and 0104h are fully compatible with the IBM XGA and XGA-NI.
  87.            For 0103h only index 0 is defined, for 0104 index 0-3 are defined.
  88.  
  89. 0109h (R/W):  ISA POS Enable                                      (VESA - ISA)
  90. bit   0-2  Instance Number (must match the instance (i.e.. 1) to enable)
  91.         3  Setup Mode Enable. If set the POS registers (0100h-0107h) may be
  92.            accessed.
  93. Note: VESA reserves 0108h-010Fh for systems with more than one XGA, but
  94.       currently only implements instance 1 (0109h).
  95.  
  96. 21x0h  (R/W):  Operating Mode Register
  97. bit   0-2  DISPLAY_MODE.
  98.              0 = VGA mode, disable XGA address decode
  99.              1 = VGA mode, enable XGA address decode
  100.              2 = 132 column text mode, disable XGA address decode
  101.              3 = 132 column text mode, enable XGA address decode.
  102.              4 = XGA Extended Graphics mode.
  103.         3  REG_FORMAT. If set the memory mapped registers use Motorola or
  104.            "Big-endian" format rather than Intel or "little-endian".
  105.            In Big-endian format the byte order in each double word (4 bytes)
  106.            is swapped except for the Short Stroke (2Ch) and Command (7Ch)
  107.            registers.
  108.         4  (XGA-NI only) MFI_CTRL_ENAB. If set the MFI Control register (index
  109.            6Dh) is enabled. This bit is write only.
  110.  
  111. 21x1h  (R/W):  Video Memory Aperture Control
  112. bit   0-1  MEMWIN_ACCESS.
  113.              0 = disable 64k aperture
  114.              1 = enable 64k aperture at 0A0000h
  115.              2 = enable 64k aperture at 0B0000h
  116.  
  117. 21x4h  (R/W):  Interrupt Enable Register
  118. bit     0  START_BLNK_ENAB. If set an interrupt is issued at the start of the
  119.            Vertical Blanking period.
  120.         1  START_PIC_ENAB. If set an interrupt is issued when the Vertical
  121.            Blanking period ends, i.e.. at the start of the frame.
  122.         2  SPRT_DSPCMP_ENAB. If set an interrupt is issued when the hardware
  123.            sprite has been displayed, i.e.. when the beam passes the lower
  124.            right corner.
  125.         6  ACCESS_REJ_ENAB. If set an interrupt is issued if the XGA Memory
  126.            Registers are written to while an XGA command is active, which can
  127.            corrupt the command.
  128.         7  CMD_DONE_ENAB. If set an interrupt is issued
  129.            whenever a graphics command completes.
  130. Note: These bits control the issuing of IRQ2 interrupts.
  131.  
  132. 21x5h  (R/W):  Interrupt Status Register
  133. bit     0  START_BLNK_STAT. Set when the Vertical Blanking starts.
  134.         1  START_PIC_STAT. Set when the Vertical Blanking ends.
  135.         2  SPRT_DSPCMP_STAT. Set when the beam passes the hardware sprite.
  136.         6  ACCESS_REJ_STAT. Set if the XGA Memory Registers are written to
  137.            while an XGA command is active.
  138.         7  CMD_DONE_STAT. Set whenever an XGA command completes.
  139. Note: These bits are set whenever the specified event occurs and remains set
  140.       until cleared by writing a 1 to the field. The bits are set whether the
  141.       corresponding flag in 21x4h is enabled or not.
  142.  
  143. 21x6h  (R/W):  Virtual Memory Control
  144. bit     0  ENAB_VIRT_LU. If set all XGA addresses are translated through the
  145.            386 Memory Management Unit, if clear all addresses are physical.
  146.         2  USER_SUPER. If set the XGA performs access checking. It also
  147.            generates an I/O exception when this register is written to.
  148.            If clear no access or I/O control is performed.
  149.         6  PROT_VIOL_ENAB. If set the XGA will issue an IRQ2 interrupt when
  150.            a memory protection violation occurs.
  151.         7  PAGE_NP_ENAB. If set the XGA will issue an IRQ2 interrupt when a
  152.            virtual page is accessed which is not in memory.
  153.  
  154. 21x7h  (R/W):  Virtual Memory Interrupt Status Register
  155. bit     6  PROT_VIOL_STAT. Set if a protection violation was found.
  156.         7  PAGE_NP_STAT. Set if a not-present page has been accessed.
  157. Note: The bits are set whether or not the corresponding flag in 21x6h is set.
  158.       The bits are cleared by writing a 1 to the bit, but as this will cause
  159.       a page retry of the failed access, care should be taken.
  160.  
  161. 21x8h  (R/W):  Video Memory Aperture Index.
  162. bit   0-5  MEMWIN_BANK. If in 64k aperture mode, this defines the 64k block
  163.            mapped at 0A0000h or 0B0000h. If in 1MB aperture mode bits 4-5
  164.            defines which 1MB block is mapped at the 1MB aperture. bits 0-3
  165.            should be set to 0.
  166.  
  167. 21x9h  (R/W):  Memory Access Mode
  168. bit   0-2  MEMPIX_SIZE. Defines bits/pixel.
  169.              0 = 1bit, 1 = 2 bits, 2 = 4 bits, 3 = 8 bits, 4 = 16 bits.
  170.         3  MEMPIX_FORMAT. If set the video memory is in Motorola or "Big-
  171.            endian" format.
  172.  
  173. 21xAh  (R/W):  Index Register
  174. bit   0-7  The index for the following access to 21xB.
  175.            21xBh accesses the index register set in 21xAh.
  176.            21xCh-21xFh accesses the index register set in 21xAh + 0-3.
  177.            I.e.. a word read of 210Eh (and thus 210Fh) will read (index+2 &
  178.            index+3).
  179.  
  180. 21xAh index  0  (R/W):  Memory Configuration 0
  181. bit   0-1  VRAM_SERDATA_WID. The width of serial VRAM transfers.
  182.              1 = 16bit, 2 = 32bit.
  183.  
  184. 21xAh index  1  (R/W):  Memory Configuration 1
  185. bit     0  VRAM_RASCAS_EXT. If set extended CAS and RAS cycles are used for
  186.            all cycles except refresh.
  187.         1  VRAM_RAS_PRECH. If set extended RAS precharge time is used
  188.            between consecutive VRAM cycles.
  189.         2  VRAM_REF_EXT. If set extended CAS and RAS cycles are used for
  190.            refresh.
  191.  
  192. 21xAh index  2  (R/W):  Memory Configuration 2
  193. bit     3  VRAM_SER_LEN. If set the VRAM serializer is 512 bits long rather
  194.            than 256 bits.
  195.  
  196. 21xAh index  4  (R):  Auto-Configuration
  197. bit     0  (XGA,XGA-NI) BUS_SIZE. If set the XGA is in a 32bit system (MCA,
  198.            EISA, LocalBus), if clear it is in an ISA slot and no 4MB aperture
  199.            mode.
  200.       0,3  (VESA) BUS_SIZE. 0 = 16bit, 1 = 32 bit, 2 = 8 bit.
  201.       4-5  (VESA) Subsystem Interface Configuration.
  202.                    0 = MCA, 1 = ISA, 3 = EISA.
  203.  
  204. 21xAh index 0Ch (R/W):  State A Data
  205. Note: The XGA state can be saved by suspending the current operation in the
  206.       Control Register, then reading the number of DWORDs from the State A
  207.       Data register specified in the State A Length Memory register, then
  208.       reading the number of DWORDs from the State B Data Register specified in
  209.       the State B Length Memory Register and finally saving the frame buffer.
  210.       To restore the state follow the procedure in reverse order ending with
  211.       enabling the suspended operation in the Control Register.
  212.  
  213. 21xAh index 0Dh (R/W):  State B Data
  214. Note: see State Save/Restore process under 21xAh index 0Ch.
  215.  
  216. 21xAh index 10h  W(R/W): Horizontal Total
  217. bit  0-15  Total number of character clocks in a scanline.
  218.            The number of pixels in a scanline is (value+1)*8
  219.  
  220. 21xAh index 12h  W(R/W): Horizontal Displayed.
  221. bit  0-15  Number of displayed character clocks in a scanline.
  222.            The number of displayed pixels is (value+1)*8
  223.  
  224. 21xAh index 14h  W(R/W): Horizontal Blanking Start.
  225. bit  0-15  The character clock at which blanking starts relative to the start
  226.            of display. The pixel is (value+1)*8
  227.  
  228. 21xAh index 16h  W(R/W): Horizontal Blanking End.
  229. bit  0-15  The character clock at which blanking ends relative to the start
  230.            of display. The pixel is (value+1)*8
  231.  
  232. 21xAh index 18h  W(R/W): Horizontal Sync Start.
  233. bit  0-15  The character clock at which Horizontal Sync starts relative to
  234.            the start of display. In pixels: (value+1)*8
  235.  
  236. 21xAh index 1Ah  W(R/W): Horizontal Sync End.
  237. bit  0-15  The character clock at which Horizontal Sync ends relative to the
  238.            start  of display. In pixels: (value+1)*8
  239.  
  240. 21xAh index 1Ch  (W): Horizontal Sync Position 1.
  241. bit   5-6  SYNC_PULSE_DLY1. Can delay the sync pulses half a character clock
  242.              0 = no change, 2 = delay sync 4 pixels.
  243. Note: This register should be programmed with the same value as index 1Eh.
  244.  
  245. 21xAh index 1Eh  (W): Horizontal Sync Position 2.
  246. bit   1-2  SYNC_PULSE_DLY2. Can delay the sync pulses half a character clock
  247.              0 = no change, 2 = delay sync 4 pixels.
  248. Note: This register should be programmed with the same value as index 1Ch.
  249.  
  250. 21xAh index 20h  W(R/W): Vertical Total.
  251. bit  0-10  Total number of scanlines (-1) in a frame.
  252.  
  253. 21xAh index 22h  W(R/W): Vertical Displayed End.
  254. bit  0-10  Number of displayed scanlines (-1).
  255.  
  256. 21xAh index 24h  W(R/W): Vertical Blanking Start.
  257. bit  0-10  The scanline relative to the start of display where the Vertical
  258.            Blanking Starts.
  259.  
  260. 21xAh index 26h  W(R/W): Vertical Blanking End.
  261. bit  0-10  The scanline relative to the start of display where the Vertical
  262.            Blanking Ends.
  263.  
  264. 21xAh index 28h  W(R/W): Vertical Sync Start.
  265. bit  0-10  The scanline relative to the start of display where the Vertical
  266.            Sync Starts.
  267.  
  268. 21xAh index 2Ah  (R/W): Vertical Sync End.
  269. bit   0-7  The scanline relative to the start of display where the Vertical
  270.            Sync Ends.
  271.  
  272. 21xAh index 2Ch  W(R/W): Vertical Line Compare.
  273. bit  0-10  The scanline relative to the start of display where the display
  274.            wraps to line 0.
  275.  
  276. 21xAh index 30h  W(R/W):  Sprite Position X
  277. bit  0-10  The X position of the Sprite Hotspot in pixels.
  278.  
  279. 21xAh index 32h  (R/W):  Sprite Hotspot X
  280. bit   0-5  The X hotspot position of the sprite from the left.
  281.  
  282. 21xAh index 33h  W(R/W):  Sprite Position Y
  283. bit  0-10  The Y position of the Sprite Hotspot in pixels.
  284.  
  285. 21xAh index 35h  (R/W):  Sprite Hotspot Y
  286. bit   0-5  The Y hotspot position of the sprite from the top.
  287.  
  288. 21xAh index 36h  (R/W): Sprite Control.
  289. bit     0  If set the sprite is displayed on the screen.
  290. Note: Sprite display must be disabled when modifying the sprite data.
  291.  
  292. 21xAh index 38h  (R/W): Sprite Color 0 Red
  293. bit   0-7  The red level of sprite color 0.
  294. Note: In the original XGA bits 0-1 are ignored.
  295.  
  296. 21xAh index 39h  (R/W): Sprite Color 0 Green
  297. bit   0-7  The green level of sprite color 0.
  298. Note: In the original XGA bits 0-1 are ignored.
  299.  
  300. 21xAh index 3Ah  (R/W): Sprite Color 0 Blue
  301. bit   0-7  The blue level of sprite color 0.
  302. Note: In the original XGA bits 0-1 are ignored.
  303.  
  304. 21xAh index 3Bh  (R/W): Sprite Color 1 Red
  305. bit   0-7  The red level of sprite color 0.
  306. Note: In the original XGA bits 0-1 are ignored.
  307.  
  308. 21xAh index 3Ch  (R/W): Sprite Color 1 Green
  309. bit   0-7  The green level of sprite color 0.
  310. Note: In the original XGA bits 0-1 are ignored.
  311.  
  312. 21xAh index 3Dh  (R/W): Sprite Color 1 Blue
  313. bit   0-7  The blue level of sprite color 0.
  314. Note: In the original XGA bits 0-1 are ignored.
  315.  
  316. 21xAh index 40h  24(R/W): Start Address.
  317. bit  0-18  The start display address in units of 8 bytes.
  318.  
  319. 21xAh index 43h  W(R/W): Pixel Map Width.
  320. bit  0-10  Length of scanline in units of 8 bytes.
  321.  
  322. 21xAh index 50h  (R/W): Display Control 1.
  323. bit   0-1  BLANK_DISP. 0 = display blanked, CRTC reset.
  324.                        1 = display blanked, preparing CRTC reset
  325.                        3 = Normal operation.
  326.         3  INTERLACED. If set the display is interlaced.
  327.         4  FEATURE_ENAB. If set the feature connector is enabled.
  328.            usually enabled in VGA modes and disabled in 132 column text
  329.            modes and extended XGA modes.
  330.       6-7  SYNC_POLAR. Sync polarity (6=Vertical, 7=Horizontal).
  331.                0=768 lines, 1=400 lines, 2=350 lines, 3=480 lines
  332. Note: on writes bit 2 must be set to 1 and bit 5 must be preserved.
  333.  
  334. 21xAh index 51h  (R/W): Display Control 2.
  335. bit   0-2  DSPPIX_SIZE. Bits per pixel (for the CRT controller):
  336.                0=1 bpp, 1=2 bpp, 2=4 bpp, 3=8 bpp, 4=16 bpp
  337.                5 might be used for 24 bit on some clones.
  338.       4-5  HSCALE. Horizontal pixel replication:
  339.                0=Normal, 1=each pixel is doubled, 2=each pixel is quadrupled??
  340.       6-7  VSCALE. Vertical pixel replication:
  341.                0=Normal, 1=each line is doubled, 2=each line is quadrupled??
  342.  
  343. 21xAh index 52h  (R): Monitor ID and Gun Output
  344. bit   0-3  MONITOR_ID. Monitor types sensed from the monitor outputs:
  345.                9   IBM 8507/IBM 8604   Mono 1024x768
  346.               0Ah  IBM 8514            Color 1024x768
  347.               0Bh  IBM 8515            Color 1024x768
  348.               0Dh  IBM 8503            Mono 640x480
  349.               0Eh  IBM 8512/IBM 8513   Color 640x480
  350.               0Fh  No monitor attached
  351.         5  RED_OUT.   Current output of the red gun. 1=high, 0=low.
  352.         6  GREEN_OUT. Current output of the green gun. 1=high, 0=low.
  353.         7  BLUE_OUT.  Current output of the blue gun. 1=high, 0=low.
  354.  
  355. 21xAh index 54h  (R/W): Clock Select 1.
  356. bit   0-1  CLK_SCALE. Divide factor for the clock:
  357.                0=no divide, 1=divide by 2
  358.       2-3  CLK_SEL1. Selects the video clock for the display:
  359.               0 = VGA 8-pixel text mode & 640x480 graphics
  360.                   If the CLK_SEL2 bit of the CLOCK_SEL2 register
  361.                   (21xAh index 70h) is set this is 132 column text mode.
  362.               1 = VGA 9-pixel text mode.
  363.               2 = Clock from the feature connector
  364.               3 = 1024x768 interlaced graphics
  365.         7  (XGA-NI only)  PROG_CLK_SEL. If set and CLK_SEL1 and CLK_SEL2 are
  366.            cleared, the PLL is selected as the clock source for the display.
  367.            This bit should be cleared if CLK_SEL1 or CLK_SEL2 are non-zero.
  368.  
  369. 21xAh index 55h  (R/W): Border Color.
  370. bit   0-7  Palette index of the border or overscan color.
  371.  
  372. 21xAh index 58h  (R/W):  PLL Program Register                    (XGA-NI only)
  373. bit   0-5  The value for the PLL.
  374.            Value = (Desired frequency * Factor from FREQ_SCALE) - 65
  375.       6-7  FREQ_SCALE. Divisor for the frequency:
  376.               0 = Divide by 4. Allowing 16.25 - 32.00MHz in 0.25MHz steps
  377.               1 = Divide by 2. Allowing 32.50 - 64.00MHz in 0.50MHz steps
  378.               2 = No divide, allowing 65.00 - 128.00MHz in 1MHz steps
  379. Note: The XGA-NI should not be programmed for more than 90MHz.
  380.  
  381. 21xAh index 59h  (R/W):  Direct Color Control                    (XGA-NI only)
  382. bit   0-2  DC_MODIF. This field controls how the missing red and blue bits
  383.            are handled in 64k color mode.
  384.               0 = Zero Intensity Black mode.  Set to 0.
  385.               1 = Non-Zero Color mode. Set to 1 unless color is 0.
  386.               2 = same as 0.
  387.               3 = Full Intensity White mode.  Set to 1.
  388.               4 = Linearized Color mode.
  389.                   Set to most significant bit of same color (bit 4).
  390.  
  391. 21xAh index 60h  W(R/W): Sprite/Palette Address Index.
  392. bit  0-13  Index for the Palette (8 bits) and Sprite (14 bits).
  393.            For sprite accesses the index will increment after each
  394.            byte access, for palette access the index will increment
  395.            after each 3 or 4 byte pixel.
  396.  
  397. 21xAh index 62h  (R/W): Sprite/Palette Index with Prefetch.
  398. bit  0-13  Index for the Palette (8 bit) or Sprite (14 bit).
  399.            When this register is written the Palette & Sprite Prefetch
  400.            registers (index 67h-69h and 6Bh) are loaded with the appropriate
  401.            data from the Palette and Sprite and the index.
  402.  
  403. 21xAh index 64h  (R/W): Palette Mask
  404. bit   0-7  Each display byte is anded with this value before reaching the DAC.
  405.            Usually set to 0FFh.
  406.  
  407. 21xAh index 65h  (R/W): Palette Data Port.
  408. bit  0-7  Palette data is read and written to this port.
  409.           Each read or write of the register will increment the
  410.           palette address, first through the Red, Green Blue
  411.           cycle, and then increment the Palette Address Index.
  412.  
  413. 21xAh index 66h  (R/W): Palette Sequence
  414. bit   0-1  COLOR_COMPNT. Shows the next palette entry access:
  415.               0=Red, 1=Green, 2=Blue, 3="extra"
  416.         2  COLOR_FORMAT. If set the palette is organised as (Red, Blue, Green
  417.            and extra), if clear the format is (Red, Green and Blue).
  418.            The 4 byte format allows reading a full palette entry in one double
  419.            word access from index 67h-69h
  420.  
  421. 21xAh index 67h  (R/W):  Palette Red Prefetch
  422. bit   0-7  When the Palette Prefetch index (index 62h) is written this
  423.            register is loaded with the red component.
  424.  
  425. 21xAh index 68h  (R/W):  Palette Blue Prefetch
  426. bit   0-7  When the Palette Prefetch index (index 62h) is written this
  427.            register is loaded with the blue component.
  428.  
  429. 21xAh index 69h  (R/W):  Palette Green Prefetch
  430. bit   0-7  When the Palette Prefetch index (index 62h) is written this
  431.            register is loaded with the green component.
  432.  
  433. 21xAh index 6Ah  (R/W):  Sprite Data
  434. bit   0-7  Sprite data is read and written through this register, incrementing
  435.            the Sprite Index (index 60h). Each byte contains 4 2bit pixels
  436.            with the following values:
  437.               0=Sprite Color 0, 1=Sprite Color 1, 2=transparent, 3=Invert
  438.  
  439. 21xAh index 6Bh  (R/W):  Sprite Data Prefetch
  440. bit   0-7  This register is loaded with sprite data when the Sprite Prefetch
  441.            Index (index 62h) is written.
  442.  
  443. 21xAh index 6Ch  (R/W):  Miscellaneous Control                   (XGA-NI only)
  444. bit     0  BLNK_REDBLUE. If set the red and blue outputs of the DAC are set
  445.            to 0.
  446.  
  447. 21xAh index 6Dh  (R/W):  MFI Control                             (XGA-NI only)
  448. bit     0  MFI_ENABLE. If set the remaining bits in this register are valid
  449.            and textmode attributes are interpreted as MFI attributes:
  450.             bit 0-3  Foreground color (same as VGA text mode)
  451.                   4  If set the first and last pixel in the underline scanline
  452.                      is set (unless the character is underlined, in which case
  453.                      they are clear).
  454.                   5  If set the character is underlined.
  455.                   6  If set the character is reversed
  456.                   7  If VGA character blink is enabled, this bit controls
  457.                      blinking, if not it sets the background color to 8.
  458.                      MFI blinking uses a 75% on/25% off-cycle as opposed
  459.                      to the VGA 50% blink cycle.
  460.         1  CURSOR_TYPE. If set the cursor reverses the ForeGround and
  461.            background, if clear it uses the ForeGround color.
  462.         2  CURS_BLINK_DISAB. If set the cursor will not blink, if clear the
  463.            cursor blinks at 1/32 the vertical refresh.
  464.         3  CONST_COLOR_CURS. If set the cursor is the color in CURS_COLOR,
  465.            if clear the cursor is the ForeGround color.
  466.       4-7  CURS_COLOR. Color of the cursor in IRGB format if CONST_COLOR_CURS
  467.            and NFI_ENABLE are set.
  468.  
  469. 21xAh index 70h  (R/W):  Clock Select 2
  470. bit     7  CLK_SEL2. Set in 132 column text mode, clear in other modes.
  471.  
  472. 21xAh index 72h-73h.  RESERVED for VESA extensions.
  473.  
  474. 21xAh index 74h  (R):  DMA Channel Readback.             (VESA - ISA bus only)
  475. bit     0  DMA Channel Enable.  Indicates whether the DMA channel is enabled
  476.            for bus-mastering.
  477.       1-3  DMA Channel Select. Selects the DMA channel for bus master
  478.            arbitration.
  479.              0 = Channel 0, 1 = Channel 1, 2 = Channel 2, 3 = Channel 3,
  480.              5 = Channel 5, 6 = Channel 6, 7 = Channel 7
  481.  
  482. 21xAh index 75h  (?):  Subsystem Vendor ID.                             (VESA)
  483. bit   0-7  After setting the index (port 21xAh) the first byte read from 21xBh
  484.            is one of three values:
  485.                 00h  The subsystem vendor ID mechanism is not implemented.
  486.             01h-FEh  Chip manufactor assigned subsystem vendor ID.
  487.                 FFh  Read the register two times more to get the 16bit vendor
  488.                      ID. (low byte first).
  489.            Any subsequent reads may return vendor specific information.
  490. Note: This register may or may not be writable at the discretion of the
  491.       vendor.
  492.  
  493. 21xAh index 76h-77h.    RESERVED for manufactor expansion               (VESA)
  494.  
  495.  
  496.  
  497. Memory 00h  D(W):  Page Directory Base Address
  498. bit  0-31  The Physical 32bit address of the current MMU Page Table for the
  499.            current task. As this start at a 4KB page the lower 12 bit are 0.
  500.            This register is active only if the ENAB_VIRT_LU bit in the Virtual
  501.            Memory Control register (21x6h bit 0) is set. This register can
  502.            only be written if the USER_SUPER bit (21xAh bit 2) is set.
  503.  
  504. Memory 04h  D(R):  Current Virtual Address
  505. bit  0-31  If a VM Hardware Not Present or Protection interrupt occurs
  506.            This register will contain the physical address of the page
  507.            that caused the fault. Bits 0-11 will always be 0.
  508.            This register is only active if the ENAB_VIRT_LU bit in the Virtual
  509.            Memory Control register (21x6h bit 0) is set.
  510.  
  511. Memory 09h  (R):  Auxiliary Status Register                      (XGA-NI only)
  512. bit     7  AUX_BUSY. If this bit is set the XGA drawing engine is busy.
  513.            This is the same bit as the BUSY bit of the Control Register
  514.            (Memory 11h bit 7), but reading this register does not block the
  515.            drawing engine.
  516.  
  517. Memory 0Ch  (R):  State A Length
  518. bit   0-7  The number of double words to read from the State A register
  519.            (21xAh index 0Ch) to perform a task save.
  520.  
  521. Memory 0Dh  (R):  State B Length
  522. bit   0-7  The number of double words to read from the State B register
  523.            (21xAh index 0Dh) to perform a task save.
  524.  
  525. Memory 11h  (R/W):  Control Register
  526. bit     1  STATE_SAVRST. Signals XGA state save/restore. If set the state can
  527.            be restored, if clear the state can be saved. The SUSPND_OPER must
  528.            be set.
  529.         3  SUSPND_OPER. Set to 1 to suspend the XDA drawing operation. When
  530.            the drawing operation has been suspended the OPER_SUSPND bit is
  531.            set. To restart a suspended operation write 0 to this bit.
  532.         4  (R) OPER_SUSPND. If set an XGA drawing operation is suspended.
  533.         5  TERM_OPER. Set to 1 to terminate the current XGA operation.
  534.            You must test for termination to complete, i.e.. until either the
  535.            BUSY bit goes to 0, or the CMD_DONE_STAT bit of the Interrupt
  536.            Status register (21x5h bit 7) is set.
  537.         7  BUSY. If set the XGA drawing engine is busy. You should not write
  538.            to any memory registers while this bit is set. On the XGA-NI you
  539.            should check the AUX_BUSY bit of the Auxiliary Status Register
  540.            (Memory 9h bit 7), as reading this register will temporarily stop
  541.            the drawing engine.
  542.  
  543. Memory 12h  (W):  Pixel Map Index
  544. bit   0-1  MAP_INDEX. Selects which Pixel map register set is accessed through
  545.            Memory register 14h-1Ch.
  546.              0 = Mask Map, 1 = Pixel Map A, 2 = Pixel Map B, 3 = Pixel Map C
  547.  
  548. Memory 14h  (W):  Pixel Map n Base
  549. bit  0-31  The 32 bit address of the map. If the XGA is in VM mode (the
  550.            ENAB_VIRT_LU bit in the Virtual Memory Control register (21x6h bit
  551.            0) is set) the address must be a logical address, else a physical
  552.            one. If using BitBLT operations combined with mixes or color
  553.            compares, the map must start on a Double word address.
  554.  
  555. Memory 18h  W(W):  Pixel Map n Width
  556. bit  0-15  The number of pixels (-1) in a scanline in the map.
  557.            If using BitBLT operations combined with mixes or color compares,
  558.            the width of the map must be a multiple of 4 bytes.
  559.  
  560. Memory 1Ah  W(W):  Pixel Map n height
  561. bit  0-15  The number of lines (-1) in the map.
  562.  
  563. Memory 1Ch  (W):  Pixel Map n Format
  564. bit   0-2  PIXEL_SIZE. Bits per pixel in the map:
  565.               0 = 1 bit, 1 = 2 bits, 2 = 4 bits, 3 = 8 bits,
  566.               4 = 16 bits (XGA-NI and some clones), 5 = 24 bits on some
  567.            clones.
  568.         3  PIX_FORMAT. If set the map is in Motorola format (Most significant
  569.            byte stored first and lowest pixel in highest bit number), if clear
  570.            in Intel format (Least significant byte stored first and lowest
  571.            pixel in lowest bit number). In both cases each pixel has the least
  572.            significant stored in the lowest bit number.
  573.  
  574. Memory 20h  W(R/W):  Bresenham Error Term
  575. bit  0-15  Bresenham Error Term = 2 * (Delta Y) - (Delta X) - Fixup
  576.            Fixup is either 0 or 1 depending on the direction of the line.
  577.            This is a 2's complement number between -8192 and 8191
  578.  
  579. Memory 24h  W(W):  Bresenham Constant 1
  580. bit  0-15  The Bresenham Constant 1 = 2 * (Delta Y)
  581.            Known as "axial step constant"
  582.            This is a 2's complement number between -8192 and 8191
  583.  
  584. Memory 28h  W(W):  Bresenham Constant 2
  585. bit  0-15  The Bresenham Constant 2 = 2 * ((Delta Y) - (Delta X))
  586.            Known as "diagonal step constant".
  587.            This is a 2's complement number between -8192 and 8191
  588.  
  589. Memory 2Ch  D(W):  Short Stroke Register
  590. bit   0-7  Stroke Code 1.  First vector
  591.            bit 0-3  LENGTH. The length in pixels (0-15).
  592.                  4  ACTION. If set the vector is drawn and the current
  593.                     position is moved, if clear the current position is moved.
  594.                5-7  VECDIR. Direction of the short stroke vector in degrees
  595.                     counter-clockwise from the positive X-axis.
  596.                     0=0, 1=45, 2=90, 3=135, 4=180, 5=225, 6=270, 7=315
  597.      8-15  Stroke Code 2.  Second vector
  598.     16-23  Stroke Code 3.  Third vector
  599.     24-31  Stroke Code 4.  Fourth vector
  600. Note: Before using this register the Command register (Memory 7Ch) must be
  601.       loaded with a Short Stroke command, the source and destination maps
  602.       setup and the start position set in the Destination Map X (Memory 78h)
  603.       and Destination Map Y (Memory 7Ah) registers.
  604.       To execute one stroke vector, load it in Stroke Code 4, to execute 2,
  605.       load them in Stroke Code 3 & 4 and to execute 4 load them in all 4
  606.       Strokes. A Stroke Code of 0 is a No-op.
  607.  
  608. Memory 48h  (W):  Foreground Mix
  609. bit   0-7  The Foreground Mix:
  610.               0  = 0 (All bits cleared).
  611.               1  = Src AND Dst
  612.               2  = Src AND (NOT Dst)
  613.               3  = Src
  614.               4  = (NOT Src) AND Dst
  615.               5  = Dst
  616.               6  = Src XOR Dst
  617.               7  = Src OR Dst
  618.               8  = (NOT Src) And (NOT Dst)
  619.               9  = Src XOR (NOT Dst)
  620.              0Ah = Not Dst
  621.              0Bh = Src OR (NOT Dst)
  622.              0Ch = NOT Src
  623.              0Dh = (NOT Src) OR Dst
  624.              0Eh = (NOT Src) or (NOT Dst)
  625.              0Fh = 1 (all bits set)
  626.              10h = MAX(Src,Dst)
  627.              11h = MIN(Src,Dst)
  628.              12h = Src + Dst  (with Saturate)
  629.              13h = Dst - Src  (with Saturate)
  630.              14h = Src - Dst  (with Saturate)
  631.              15h = (Src + Dst)/2
  632.            Src is the pixel from the color registers or the source map, Dst is
  633.            pixel from the destination map. Saturate means that the result is
  634.            limited by 0 and the max pixel value.
  635.  
  636. Memory 49h  (W):  Background Mix
  637. bit   0-7  The Background Mix. Same values as the Foreground Mix (Memory 48h)
  638.  
  639. Memory 4Ah  (W):  Color Compare Function
  640. bit   0-2  CC_COND. Color Compare condition on all pixel drawing operations:
  641.               0  Always true
  642.               1  Dst > CC
  643.               2  Dst == CC
  644.               3  Dst < CC
  645.               4  Always false
  646.               5  Dst >= CC
  647.               6  Dst != CC
  648.               7  Dst <= CC
  649.             Dst refers to the pixel, and CC to the color specified in the
  650.             Color Compare register (Memory 4Ch). The destination pixel is
  651.             updated if the condition is false. The default setting of this
  652.             register should be 4 (always false) in order to update all pixels.
  653.  
  654. Memory 4Ch  D(W):  Color Compare Color
  655. bit  0-31  The color used in color compares.
  656.  
  657. Memory 50h  D(W):  Plane Mask
  658. bit  0-31  This register can protect individual bits in a pixel from change by
  659.            the drawing engine. A bit in a pixel can only be changed if the
  660.            corresponding bit in this register is set.
  661.  
  662. Memory 54h  D(W):  Carry Chain Mask
  663. bit  0-31  This register determines whether carries from arithmetic
  664.            operations should be propagated to the next bit. If bit n is set
  665.            any carry from the operations on bit n is propagated to bit n+1.
  666.  
  667. Memory 58h  D(W):  Foreground Color
  668. bit  0-31  This is the ForeGround color for draw operations.
  669.  
  670. Memory 5Ch  D(W):  Background Color
  671. bit  0-31  This is the background color for draw operations.
  672.  
  673. Memory 60h  W(W):  Operation Dimension 1
  674. bit  0-15  For BitBLT operations this is the pixel width of the BitBLT
  675.            operation. For line operations this is the pixel length of the line
  676.            (-1). This can be calculated as: MAX(abs(Delta X),abs(Delta Y))
  677.            The value must be between 0 and 4095.
  678.  
  679. Memory 62h  W(W):  Operation Dimension 2
  680. bit  0-15  This is the line height of the BitBLT operation (-1).
  681.            The value must be between 0 and 4095.
  682.  
  683. Memory 6Ch  W(W):  Mask Map Origin X Offset
  684. bit  0-15  The X offset in pixels of the Mask Map within the Destination Map.
  685.            The value must be between 0 and 4095.
  686.  
  687. Memory 6Eh  W(W):  Mask Map Origin Y Offset
  688. bit  0-15  The Y offset in pixels of the Mask Map within the Destination Map.
  689.            The value must be between 0 and 4095.
  690.  
  691. Memory 70h  W(R/W):  Source Map X
  692. bit  0-15  The X position of the first pixel used within the Source Map.
  693.            The value must be between 0 and 4095.
  694.  
  695. Memory 72h  W(R/W):  Source Map Y
  696. bit  0-15  The Y position of the first pixel used within the Source Map.
  697.            The value must be between 0 and 4095.
  698.  
  699. Memory 74h  W(R/W):  Pattern Map X
  700. bit  0-15  The X position of the first pixel used within the Pattern Map.
  701.            The value must be between 0 and 4095.
  702.  
  703. Memory 76h  W(R/W):  Pattern Map Y
  704. bit  0-15  The Y position of the first pixel used within the Pattern Map.
  705.            The value must be between 0 and 4095.
  706.  
  707. Memory 78h  W(R/W):  Destination Map X
  708. bit  0-15  The X position of the first pixel used within the Destination Map.
  709.            The value should be between -2048 and 6143 (2's complement).
  710.  
  711. Memory 7Ah  W(R/W):  Destination Map Y
  712. bit  0-15  The Y position of the first pixel used within the Destination Map.
  713.            The value should be between -2048 and 6143 (2's complement).
  714.  
  715. Memory 7Ch  D(W):  Command Register
  716. bit   0-2  OCTANT. Selects the direction of line draws and BitBLTs.
  717.              bit 0  YMAJOR. If set the line is longer in the Y dimension than
  718.                     the X dimension. Not used for BitBLTs.
  719.                  1  DEC_Y. If set the line is drawn in the negative Y
  720.                     direction.
  721.                  2  DEC_X. If set the line is drawn in the negative X
  722.                     direction.
  723.       4-5  DRAW_MODE. Selects the drawing mode for line and short stroke ops:
  724.              0 = Draw all pixels.
  725.              1 = Draw all but the first pixel
  726.              2 = Draw all but the last pixel.
  727.              3 = Draw area boundary.
  728.       6-7  MASK_MODE. Selects the mask.
  729.              0 = No mask.
  730.              1 = Use mask boundary. The Mask Map X/Y Origin and Pixel Map 0
  731.                  Width/Height registers define a rectangle. No pixel updates
  732.                  will occur outside the rectangle.
  733.              2 = Map Mask enabled. Pixels can only be updated if they are
  734.                  inside the rectangle AND the corresponding bit in the map is
  735.                  1.
  736.     12-15  PATT_SRC. Selects the pattern.
  737.              1 = Pixel Map A, 2 = Pixel Map B, 3 = pixel Map C,
  738.              8 = Always ForeGround, 9 = Pattern from source data.
  739.            The pattern selects whether the ForeGround or background data is
  740.            used for the drawing operation.
  741.     16-19  DST_MAP. Selects the destination map.
  742.              1 = Pixel Map A, 2 = Pixel Map B, 3 = Pixel Map C
  743.     20-23  SRC_MAP. Selects the source map.
  744.              1 = Pixel Map A, 2 = Pixel Map B, 3 = Pixel Map C
  745.     24-27  COMMAND. The draw command:
  746.              2  = Short Stroke Read.
  747.              3  = Line Draw Read.
  748.              4  = Short Stroke Write. Puts the XGA in Short stroke mode. All
  749.                   actual draws happen by writes to the Short Stroke register.
  750.              5  = Line Draw Write. Writes a line in the destination map.
  751.                   Line direction and length are set in the Bresenham and
  752.                   Direction 1 registers.
  753.              8  = BitBLT.
  754.              9  = Inverting BitBLT.
  755.             0Ah = Area Fill.
  756.     28-29  FORE_SRC. The source of the ForeGround mix operation:
  757.                0 = Foreground color, 2 = Source Pixel Map.
  758.            The ForeGround source is effective when a pattern map is used, and
  759.            the corresponding bit in the pattern is 1, or when the pattern
  760.            source is given as Foreground.
  761.     30-31  BACK_SRC. The source of the background mix operation:
  762.                0 = Background color, 2 = Source Pixel Map.
  763.            The background source is effective when a pattern map is used, and
  764.            the corresponding bit in the pattern is 0.
  765.  
  766.  
  767.  
  768.  
  769.   Video Modes:
  770.  
  771.     640x480   256 colors
  772.     640x480 65536 colors
  773.     800x600    16 colors
  774.     800x600   256 colors
  775.     800x600 65536 colors
  776.    1024x768    16 colors
  777.    1024x768   256 colors
  778.  
  779.  
  780.    All modes use a linear address mode, where bits 16-23 of the address
  781.    are in the Video Aperture Index register (xga+8), and the lower 16 bits
  782.    are the offset from 0A000:0.
  783.  
  784.    In 16 color modes two pixels are stored in each byte. Even pixels are in
  785.    bits 0-3 and odd pixels in bits 4-7.
  786.    Address of pixel = (row *(pixels per row)+column) /2.
  787.  
  788.    In 256 color modes each pixel occupies a byte. The pixels are addressed
  789.    in linear fashion. Address of pixel = row *(pixels per row) + column.
  790.  
  791.    In 65536 color modes each pixel occupies two bytes.
  792.    Address of pixel = (row *(pixels per row)+column)*2.
  793.  
  794.  
  795.  
  796. VESA XGA Real Mode BIOS Specification:
  797.  
  798. ----------104E00-------------------------
  799. INT 10 - VESA XGA - Return XGA Environment Information
  800.         AX = 4E00h
  801.         ES:DI -> 256 byte buffer
  802. Return: AL = 4Eh if function supported.
  803.         AH = 00h if function successful, errorcode if not.
  804. Buffer is filled with environment information:
  805. Offset Size    Description:
  806.  00h  4 BYTEs  signature ('VESA')
  807.  04h   WORD    VESA version. High byte is major version.
  808.  06h   DWORD   Pointer to NULL terminated OEMstring.
  809.  0Ah   DWORD   EnvironmentFlag:
  810.                  bit 0-1  System BUS: 0 = MCA, 1 = ISA, 3 = EISA.
  811.                        2  If set bus mastering is available.
  812.                     3-31  Reserved.
  813.  0Eh   WORD    Number of XGA installed. Functions 1-6 require a handle from
  814.                0 to (XGAs -1) to identify the desired XGA board.
  815.  10h - FFh     Reserved.
  816. ----------104E01----------------------------
  817. INT 10 - VESA XGA - Return XGA Subsystem Information
  818.         AX = 4E01h
  819.         DX = XGA handle (0 to (XGAs -1))
  820.         ES:DI -> 256 byte buffer.
  821. Return: AL = 4Eh if function supported.
  822.         AH = 00h if function successful, errorcode if not.
  823. Buffer is filled with environment information:
  824. Offset Size    Description:
  825.   00h  DWORD   Pointer to null-terminated board OEM string.
  826.   04h  DWORD   Capabilities:
  827.                bit 0-1  Board Bus Architecture: 0=MCA, 1=ISA, 3=EISA
  828.                    2-3  Reserved
  829.                    4-6  DMA Channel assigned for acquiring bus mastership
  830.                         (only for ISA bus systems).
  831.                      7  DMA Channel Status (ISA only). Enabled if set.
  832.                   8-31  Reserved.
  833.   08h  DWORD   Pointer to 8KB XGA ROM (or NULL).
  834.   0Ch  DWORD   Pointer to the XGA memory mapped registers.
  835.   10h  WORD    Base address of XGA I/O registers (21x0h)
  836.   12h  DWORD   Pointer to start of physical video memory (0A000h:0 or
  837.                0B000h:0)
  838.   16h  DWORD   Physical address of 4MB aperture (or NULL if none).
  839.   1Ah  DWORD   Physical address of 1MB aperture (or NULL if none).
  840.   1Eh  DWORD   Physical address of 64KB aperture (or NULL if not enabled).
  841.   22h  DWORD   Physical address of OEM aperture (or NULL if none).
  842.   26h  WORD    Size of OEM aperture in 64KByte units.
  843.   28h  DWORD   Pointer to list of video modes. The list is a series of WORDs
  844.                terminated by 0FFFFh.
  845.   2Ch  WORD    Number of 64KB blocks on the board.
  846.   2Eh  DWORD   XGA manufactor ID. Byte 0 is POS data index 1, Byte 1 is index
  847.                2 and byte 2 is 21xAh index 75h.
  848.   32h - FFh    Reserved.
  849. ----------104E02-----------------------------------
  850. INT 10 - VESA XGA - Return XGA Mode Information
  851.         AX = 4E02h
  852.         CX = Video mode
  853.         DX = XGA handle
  854.         ES:DI -> 256 byte buffer
  855. Return: AL = 4Eh if function supported.
  856.         AH = 00h if function successful, errorcode if not.
  857. Buffer is filled with mode information:
  858. Offset Size    Description:
  859.   00h  WORD    Attributes of the mode:
  860.                  bit 0  If set the mode is supported
  861.                      1  Reserved
  862.                      2  If set output is supported by the BIOS
  863.                      3  Reserved
  864.                      4  If set this is a graphics mode (VGA registers
  865.                         inactive, XGA active), if clear this is a text mode
  866.                         (VGA registers active, XGA inactive)
  867.   02h  WORD    Bytes per logical scanline
  868.   04h  WORD    Horizontal Resolution in pixels
  869.   06h  WORD    Vertical Resolution in scanlines
  870.   08h  BYTE    Character Width in pixels
  871.   09h  BYTE    Character Height in pixels
  872.   0Ah  BYTE    Number of planes
  873.   0Bh  BYTE    Bits per pixels
  874.   0Ch  BYTE    Memory Model
  875.                  0 = Text Mode
  876.                  1 = CGA graphics
  877.                  2 = Hercules graphics
  878.                  3 = 4-planar graphics
  879.                  4 = Packed Pixel
  880.                  5 = Non-chain 4, 256 color
  881.                  6 = Direct Color
  882.                  7 = YUV-24
  883.   0Dh  BYTE    Number of Image Pages
  884.   0Eh  BYTE    Number of Red bits
  885.   0Fh  BYTE    Bit Position of Red bit field
  886.   10h  BYTE    Number of Green bits
  887.   11h  BYTE    Bit Position of Green bit field
  888.   12h  BYTE    Number of Blue bits
  889.   13h  BYTE    Bit Position of Blue bit field
  890.   14h  BYTE    Number of Reserved bits
  891.   15h  BYTE    Bit Position of Reserved bit field
  892.   16h - FFh    Reserved
  893. ----------104E03-----------------------------------
  894. INT 10 - VESA XGA - Set XGA Video Mode
  895.         AX = 4E03h
  896.         BX = Video Mode
  897.         CX = Other Command Flags
  898.              bit 0  If clear the feature connector is set to the default state
  899.         DX = XGA handle
  900.         ES:DI -> 256 byte buffer
  901. Return: AL = 4Eh if function supported.
  902.         AH = 00h if function successful, errorcode if not.
  903. ----------104E04-----------------------------------
  904. INT 10 - VESA XGA - Return Current Video Mode
  905.         AX = 4E04h
  906.         DX = XGA handle
  907. Return: AL = 4Eh if function supported.
  908.         AH = 00h if function successful, errorcode if not.
  909. ----------104E05-----------------------------------
  910. INT 10 - VESA XGA - Set Feature Connector State
  911.         AX = 4E05h
  912.         BX = Feature Connector State
  913.              bit 0  If set the Feature Connector is enabled.
  914.                  1  If set Feature Connector is in Output Mode,
  915.                     if clear in Input Mode
  916.         DX = XGA handle
  917. Return: AL = 4Eh if function supported.
  918.         AH = 00h if function successful, errorcode if not.
  919. ----------104E06-----------------------------------
  920. INT 10 - VESA XGA - Return Feature Connector State
  921.         AX = 4E06h
  922.         DX = XGA handle
  923. Return: AL = 4Eh if function supported.
  924.         AH = 00h if function successful, errorcode if not.
  925.         BX = Feature Connector State
  926.              bit 0  If set the Feature Connector is enabled.
  927.                  1  If set the Feature Connector is in Output Mode,
  928.                     if clear in Input Mode.
  929.               2-15  Reserved(0)
  930.  
  931.  
  932. DMQS (Display Mode Query and Set) interface:
  933. Not supported on the original IBM XGA, only on XGA-NI (non-interlaced) and
  934. later models.
  935. ----------101F00-----------------------------
  936. INT 10 - VIDEO - XGA - GET DMQS DATA LENGTH
  937.         AX = 1F00h
  938. Return: AL = 1Fh if supported
  939.         BX = number of bytes of DMQS data
  940. ----------101F01-----------------------------
  941. INT 10 - VIDEO - XGA - READ DMQS DATA
  942.         AX = 1F01h
  943.         ES:DI -> user buffer for return data (call AX=1F00h for size)
  944. Return: AL = 1Fh if function supported
  945. Format of XGA DMQS buffer:
  946. Offset Size   Description
  947.   00h  WORD   offset (in bytes) to DMQS data for next XGA instance
  948.   02h  BYTE   slot number
  949.   03h  BYTE   XGA implementation function level identifier
  950.   04h  BYTE   XGA implementation resolution level identifier
  951.   05h  WORD   vendor identifier - identifies card vendor
  952.   07h  WORD   vendor defined field
  953.   09h  WORD   XGA adapter I/O register base address
  954.   0Bh  WORD   XGA coprocessor register base address
  955.               (paragraph--multiply by 10h to get physical address)
  956.   0Dh  WORD   1 Megabyte system video memory aperture
  957.                  0000h if not allocated
  958.               (Multiply by 100000h to get physical address)
  959.   0Fh  WORD   4 Megabyte system video memory aperture
  960.                  0000h if not allocated
  961.               (multiply by 100000h to get physical address)
  962.   11h  WORD   video memory base address
  963.               (multiply by 100000h to get physical address)
  964.   13h  WORD   composite ID of the attached display
  965.   15h  BYTE   amount of video memory available, in multiples of 256K bytes
  966.   16h  DWORD  alternate XGA coprocessor register base address.  0 = none.
  967.   1Ah  var    DMQS Data for further XGA Instances (as above)
  968. Note: "Instances" refers to the capability of having up to 8 XGA adapters in
  969.       one computer.
  970.